import express from 'express'
import fs from 'fs'

const server = express()

server.use(express.static('./'))

server.get('/salary', (req, res) => {
  const results = fs.readFileSync('./results.json', 'utf-8')
  res.send(results)
})

server.listen(3000, () => {
  console.log('server is running')
})